<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        [v-cloak],[v-once]{
            display: none;
        }
    </style>
    <script src="js/vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- v-text，作用于插值表达式相同 -->
        <p>消息：{{ msg }}</p>
        <p v-text="'消息：'+msg"></p>
        <hr>

        <!-- v-html -->
        <p v-text="str"></p>
        <p v-html="str"></p>
        <hr>

        <!-- v-pre -->
        <p v-pre>可以通过{{ msg }}获取变量msg的值</p>
        <hr>

        <!-- v-once -->
        <p v-once>{{ msg }}</p>
        <hr>

        <!-- v-cloak -->
        <p v-cloak>{{ msg }}</p>
    </div>
</body>
<script>
    setTimeout(() => {
        new Vue({
            el:'#app',
            data:{
                msg:'hello',
                str:'<h2>world</h2>'
            }
        })
    }, 5000);
</script>
</html>